import 'package:boss/color_constant.dart';
import 'package:boss/textStyle/text_style.dart';
import 'package:boss/ui/page/commodity/categories/page/plusCommodityMode/model/plus_commodity_mode.dart';
import 'package:boss/ui/widget/image/base_image.dart';
import 'package:boss/ui/widget/shadow_radius_card.dart';
import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';

class PlusCommodityModeItem extends StatelessWidget {
  final PlusCommodityMode data;
  final VoidCallback onTap;

  const PlusCommodityModeItem({
    Key key,
    this.data,
    this.onTap,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      behavior: HitTestBehavior.translucent,
      child: ShadowRadiusCard(
        margin: EdgeInsets.symmetric(
          vertical: 16.w,
        ),
        padding: EdgeInsets.symmetric(
          vertical: 20.w,
          horizontal: 30.w,
        ),
        child: Row(
          children: <Widget>[
            BaseImage(
              data.icon,
              width: 100.w,
              height: 100.w,
            ),
            Container(
              margin: EdgeInsets.only(
                left: 30.w,
              ),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.spaceAround,
                crossAxisAlignment: CrossAxisAlignment.start,
                children: <Widget>[
                  Row(
                    children: <Widget>[
                      Container(
                        width: 10.w,
                        height: 10.w,
                        margin: EdgeInsets.only(
                          right: 16.w,
                        ),
                        decoration: BoxDecoration(
                          shape: BoxShape.circle,
                          color: ColorConstant.ff5770f6,
                        ),
                      ),
                      Text(
                        data.title,
                        style: TextStyleConstant().blue_32,
                      ),
                    ],
                  ),
                  Text(
                    data.subTitle,
                    style: TextStyleConstant().normal_3_24,
                  ),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
